package com.xiyoo.cw.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Description user
 * @Author zhouzhongqing
 * @Date 2025/5/13 10:31
 * @Version 1.0
 **/
@Data
@TableName("cw_user")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class User implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("邮箱")
    @NotEmpty(message = "email为必填")
    @Pattern(regexp = "^[a-zA-Z0-9._%+-]+@mhdchina\\.cn$", message = "请输入正确的邮箱，必须以@mhdchina.cn为后缀")
    private String email;

    @ApiModelProperty("昵称")
    @NotEmpty(message = "昵称为必填")
    private String nickName;
}
